package com.Enums;

import static com.Enums.Outcome.*;

/**
 * @author 13699
 */
public enum RoShamBo2 implements Competitor<RoShamBo2>{
    PAPER(DRAW,LOSE,WIN),
        SCISSORS(WIN,DRAW,LOSE),
            ROCK(LOSE,WIN,DRAW);

    private Outcome vPAPER,vSCISSORS,vROCK;

    RoShamBo2(Outcome draw, Outcome lose, Outcome win) {
        this.vPAPER=draw;
        this.vSCISSORS=lose;
        this.vROCK=win;
    }
    @Override
    public Outcome compete(RoShamBo2 competitor) {
        switch (competitor){
            default:
            case ROCK:return vROCK;
            case PAPER:return vPAPER;
            case SCISSORS:return vSCISSORS;
        }
    }

    public static void main(String[] args) {
        RoShamBo.play(RoShamBo2.class,20);
    }
}
